package com.shujia.day17;

import java.util.function.Consumer;

public class Code13LambdaFunction {
    public static void main(String[] args) {
        /*
            @FunctionalInterface
            public interface Consumer<T> {
                void accept(T t);
            }
         */
//        Consumer<Student> consumer = (student) -> {student.printInfo()};
        Consumer<Student> consumer = student -> student.printInfo();
        consumer.accept(new Student("周州"));

        Consumer<Student> comsumer2 = Student::printInfo;

        comsumer2.accept(new Student("黄晓敏"));



    }
}
